/*
 * Copyright @ 苏州瑞云信息技术有限公司 All rights reserved.
 */
package cn.com.recloud.bbs;

import cn.com.recloud.one.spring.feign.FeignConfigService;
import org.keycloak.adapters.springboot.KeycloakSpringBootConfigResolver;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;

/**
 * @author Herry Hong
 * @description
 * @date 2020/6/2
 */
@EnableCaching
@ComponentScan(basePackages = "cn.com.recloud", excludeFilters =@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value ={  FeignConfigService.class}))
@MapperScan("cn.com.recloud.**.dao")
@SpringBootApplication
public class BbsApplication{
    public static void main(String[] args) {
        SpringApplication.run(BbsApplication.class, args);
    }

    @Bean
    public KeycloakSpringBootConfigResolver keycloakConfigResolver() {
        return new KeycloakSpringBootConfigResolver();
    }

}
